import json
import base64
import requests

res = requests.get(
    "https://gitee.com/api/v5/repos/src-openeuler/gupnp/git/blobs/3e51dd35fb75b523109f03d724825e8b27e1c67b")
# print(res)
# print(json.loads(res.content.decode("utf-8")).get("content"))
b64_byt = json.loads(res.content.decode("utf-8")).get("content")
byt = base64.b64decode(b64_byt)
# # byt = base64.b64decode( b64_str )
# print(type(byt), byt)
#
# # 将字节转换成字符
str = byt.decode('utf-8')
print(str)
